The dm-crypt is a kernel-level encryption mechanism which offers transparent disk encryption. This means that the files are immediately available without any additional interaction after mounting. LUKS = Linux Unified Key Setup
Create the encrypted drive following:
cryptsetup -y -v luksFormat /dev/sdX
Make the file system.
cryptsetup open /dev/sdX cryptroot mkfs.ext4 /dev/mapper/cryptroot
Mount the file system.
cryptsetup open /dev/sdX cryptroot mount /dev/mapper/cryptroot /media/external
Unmount the file system.
umount /media/external cryptsetup luksClose /dev/mapper/cryptroot